#include <linux/memblock.h>

static int memblock_add_range(struct memblock_type *type,
                              phys_addr_t base, phys_addr_t size,
                              int nid, enum memblock_flags flags)
{
    if (!size)
        return 0;

    /* special case for empty array */
    if (type->regions[0].size == 0)
    {
		type->regions[0].base = base;
		type->regions[0].size = size;
		type->regions[0].flags = flags;
		type->total_size = size;
		type->cnt = 1;

        return 0;
    }

    return 0;
}
